﻿// =================================================================== 
// 项目说明,功能实体类,用CodeSmith自动生成。
// =================================================================== 
// 文件名: ClientEntity.cs
// 修改时间：2020-9-8 10:39:56
// 修改人: lixiong
// =================================================================== 
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using JX.Infrastructure.Attribute;
using JX.Infrastructure.Common;

namespace JX.Core.Entity
{
	/// <summary>
	/// 数据库表：Client 的实体类.
	/// </summary>
	[Table("Client")]
	public partial class ClientEntity
	{
		#region Properties
		private int? _clientID = 0;
		/// <summary>
		/// 客户ID(主键)
		/// </summary>
		[Column("ClientID",TypeName="int")]
		[Key]
		public int? ClientID
		{
			get {return _clientID;}
			set {_clientID = value;}
		}
		
		private int? _parentID = 0;
		/// <summary>
		/// 上级客户ID
		/// </summary>
		[Column("ParentID",TypeName="int")]
		public int? ParentID
		{
			get {return _parentID;}
			set {_parentID = value;}
		}
		
		private System.String _clientNum = string.Empty;
		/// <summary>
		/// 客户编号
		/// </summary>
		[Column("ClientNum",TypeName="nvarchar(20)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String ClientNum
		{
			get {return _clientNum;}
			set {_clientNum = value;}
		}
		
		private int? _clientType = 0;
		/// <summary>
		/// 客户类别，0--企业客户，1--个人客户
		/// </summary>
		[Column("ClientType",TypeName="int")]
		public int? ClientType
		{
			get {return _clientType;}
			set {_clientType = value;}
		}
		
		private System.String _clientName = string.Empty;
		/// <summary>
		/// 客户名称（姓名）
		/// </summary>
		[Column("ClientName",TypeName="nvarchar(100)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String ClientName
		{
			get {return _clientName;}
			set {_clientName = value;}
		}
		
		private System.String _shortedForm = string.Empty;
		/// <summary>
		/// 助记名称（简称）
		/// </summary>
		[Column("ShortedForm",TypeName="nvarchar(20)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String ShortedForm
		{
			get {return _shortedForm;}
			set {_shortedForm = value;}
		}
		
		private int? _area = 0;
		/// <summary>
		/// 区域
		/// </summary>
		[Column("Area",TypeName="int")]
		public int? Area
		{
			get {return _area;}
			set {_area = value;}
		}
		
		private int? _clientField = 0;
		/// <summary>
		/// 行业
		/// </summary>
		[Column("ClientField",TypeName="int")]
		public int? ClientField
		{
			get {return _clientField;}
			set {_clientField = value;}
		}
		
		private int? _valueLevel = 0;
		/// <summary>
		/// 价值评估
		/// </summary>
		[Column("ValueLevel",TypeName="int")]
		public int? ValueLevel
		{
			get {return _valueLevel;}
			set {_valueLevel = value;}
		}
		
		private int? _creditLevel = 0;
		/// <summary>
		/// 信用等级
		/// </summary>
		[Column("CreditLevel",TypeName="int")]
		public int? CreditLevel
		{
			get {return _creditLevel;}
			set {_creditLevel = value;}
		}
		
		private int? _importance = 0;
		/// <summary>
		/// 重要程度
		/// </summary>
		[Column("Importance",TypeName="int")]
		public int? Importance
		{
			get {return _importance;}
			set {_importance = value;}
		}
		
		private int? _connectionLevel = 0;
		/// <summary>
		/// 关系等级
		/// </summary>
		[Column("ConnectionLevel",TypeName="int")]
		public int? ConnectionLevel
		{
			get {return _connectionLevel;}
			set {_connectionLevel = value;}
		}
		
		private int? _groupID = 0;
		/// <summary>
		/// 客户组别
		/// </summary>
		[Column("GroupID",TypeName="int")]
		public int? GroupID
		{
			get {return _groupID;}
			set {_groupID = value;}
		}
		
		private int? _sourceType = 0;
		/// <summary>
		/// 客户来源
		/// </summary>
		[Column("SourceType",TypeName="int")]
		public int? SourceType
		{
			get {return _sourceType;}
			set {_sourceType = value;}
		}
		
		private int? _phaseType = 0;
		/// <summary>
		/// 阶段
		/// </summary>
		[Column("PhaseType",TypeName="int")]
		public int? PhaseType
		{
			get {return _phaseType;}
			set {_phaseType = value;}
		}
		
		private System.String _description = string.Empty;
		/// <summary>
		/// 备注
		/// </summary>
		[Column("Description",TypeName="nvarchar(MAX)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Description
		{
			get {return _description;}
			set {_description = value;}
		}
		
		private int? _visitTimes = 0;
		/// <summary>
		/// 回访次数
		/// </summary>
		[Column("VisitTimes",TypeName="int")]
		public int? VisitTimes
		{
			get {return _visitTimes;}
			set {_visitTimes = value;}
		}
		
		private int? _serviceTimes = 0;
		/// <summary>
		/// 服务次数
		/// </summary>
		[Column("ServiceTimes",TypeName="int")]
		public int? ServiceTimes
		{
			get {return _serviceTimes;}
			set {_serviceTimes = value;}
		}
		
		private int? _complainTimes = 0;
		/// <summary>
		/// 投诉次数
		/// </summary>
		[Column("ComplainTimes",TypeName="int")]
		public int? ComplainTimes
		{
			get {return _complainTimes;}
			set {_complainTimes = value;}
		}
		
		private DateTime? _lastVisitTime = null;
		/// <summary>
		/// 上次回访时间
		/// </summary>
		[Column("LastVisitTime",TypeName="datetime")]
		public DateTime? LastVisitTime
		{
			get {return _lastVisitTime;}
			set {_lastVisitTime = value;}
		}
		
		private DateTime? _lastServiceTime = null;
		/// <summary>
		/// 上次服务时间
		/// </summary>
		[Column("LastServiceTime",TypeName="datetime")]
		public DateTime? LastServiceTime
		{
			get {return _lastServiceTime;}
			set {_lastServiceTime = value;}
		}
		
		private DateTime? _lastComplainTime = null;
		/// <summary>
		/// 上次投诉时间
		/// </summary>
		[Column("LastComplainTime",TypeName="datetime")]
		public DateTime? LastComplainTime
		{
			get {return _lastComplainTime;}
			set {_lastComplainTime = value;}
		}
		
		private DateTime? _createTime = null;
		/// <summary>
		/// 创建时间
		/// </summary>
		[Column("CreateTime",TypeName="datetime")]
		public DateTime? CreateTime
		{
			get {return _createTime;}
			set {_createTime = value;}
		}
		
		private DateTime? _updateTime = null;
		/// <summary>
		/// 更新时间
		/// </summary>
		[Column("UpdateTime",TypeName="datetime")]
		public DateTime? UpdateTime
		{
			get {return _updateTime;}
			set {_updateTime = value;}
		}
		
		private System.String _owner = string.Empty;
		/// <summary>
		/// 所有者
		/// </summary>
		[Column("Owner",TypeName="nvarchar(50)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Owner
		{
			get {return _owner;}
			set {_owner = value;}
		}
		
		private decimal? _balance = 0;
		/// <summary>
		/// 资金余额
		/// </summary>
		[Column("Balance",TypeName="money")]
		public decimal? Balance
		{
			get {return _balance;}
			set {_balance = value;}
		}
		
		private DateTime? _lastContactedTime = null;
		/// <summary>
		/// 最近联系时间
		/// </summary>
		[Column("LastContactedTime",TypeName="datetime")]
		public DateTime? LastContactedTime
		{
			get {return _lastContactedTime;}
			set {_lastContactedTime = value;}
		}
		
		private System.String _remark = string.Empty;
		/// <summary>
		/// 备注
		/// </summary>
		[Column("Remark",TypeName="nvarchar(MAX)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String Remark
		{
			get {return _remark;}
			set {_remark = value;}
		}
		
		#endregion
	}
}
